function X = pol2cart(P,O)
% Convert a matrix of spherical coordinates [range azimuth elevation]
% to cartesian coordinates [x y z] using:

% Corrects for bias due to spherical to cartesian transformation
% when noise is present
% sr range and sigma range
% sb azimuth and sigma azimuth
% se elevation and sigma elevation

X(:,1) = P(:,1).*cos(P(:,2)) + O(1);
X(:,2) = P(:,1).*sin(P(:,2)) + O(2);